Add test cases for JSON null values and fix validator/dialect handling#465
Add test cases for JSON null values and fix validator/dialect handling#465Copilot wants to merge 2 commits intofeat/json-nulls-filterfrom
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
|
@copilot where're your changes? |
… validator/dialect Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The changes are in commit ba45db2. Here's what was changed:
|
The test suite didn't cover JSON objects or arrays containing
nullvalues as elements (e.g.,{ key: null }or[1, null, 3]). Adding these tests revealed bugs in both the validator and SQLite dialect.Changes
Test cases: Added
works with JSON objects containing null valuesandworks with JSON arrays containing null valuestests covering creation, equality filters, and not filtersValidator fix (
validator/index.ts):makeJsonValueSchemanow allows null elements in JSON arrays, matching theJsonArraytype definitionSQLite dialect fix (
dialects/sqlite.ts):transformPrimitivenow handles JSON type before the array check, ensuring JSON values are serialized as a whole rather than element-by-element (which would cause SQLite binding errors for arrays with null elements)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.